// oss 文件地址
export function ossName(val) {
	let domainName = "";
	if (val.indexOf("https://ckscm.oss-cn-shenzhen.aliyuncs.com/rop_applet_material/image/") == -1) {
		let name = "https://ckscm.oss-cn-shenzhen.aliyuncs.com/rop_applet_material/image/" + val;
		domainName = name.toString();
	} else {
		domainName = val;
	}
	return domainName;
}

// 订单状态翻译
export function orderState(val) {
	const orderState = {
		1: '待确认',
		2: '配送中',
		3: '已完成',
		4: '已取消',
	}

	return orderState[val] || val
}

// 订单状态样式
export function orderStateClass(val) {
	const orderState = {
		1: 'primary',
		2: 'warning',
		3: 'success',
		4: 'info',
	}

	return orderState[val] || val
}